<?php

class Application_Form_AddComment extends Zend_Form
{

    public function init()
    {
        // Set the method for the display form to POST
        $this->setMethod('post');
        
        // Add a text element
        $this->addElement('text', 'title', array(
            'label'      => 'Title:',
            'required'   => true,
            'filters'    => array('StringTrim')
        ));
        
        // Add the comment element
        $this->addElement('textarea', 'content', array(
            'label'      => 'Content:'
        ));
        $this->getElement('content')->setAttribs(array('rows'=>5,'cols'=>60));
        
        // Add the submit button
        $this->addElement('submit', 'submit', array(
            'ignore'   => true,
            'label'    => 'Submit',
        ));
 
        // And finally add some CSRF protection
        $this->addElement('hash', 'csrf', array(
            'ignore' => true,
        ));
    }


}

